<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
    <body>
        <form>
            <?php
    
    include '../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
    
    $ingreso = $_REQUEST['ingreso']; 
    
    $unidad = "select lTransfunc.ltr_oid,ltr_fecha,(GENPACIEN.PACPRINOM + ' ' + GENPACIEN.PACSEGNOM + ' ' + GENPACIEN.PACPRIAPE + ' ' + GENPACIEN.PACSEGAPE) as nombres,GENPACIEN.PACNUMDOC,
                      ser_descripcion,ltr_grupoS,ltr_componente,ltr_rai1,ltr_autoC,ltr_numSe,ltr_componente,ltr_grupoSU,ltr_pruebC,ltr_tempS,ltr_estado,
                      con_cants,con_cants,con_teml,SUBSTRING(CONVERT(varchar(8),con_hi),1,8) as tiempoi,SUBSTRING(CONVERT(varchar(8),con_hf),1,8) as tiempof,(rtrim(med.usu_nombres) + ' ' + rtrim(med.usu_apellidos))as medicor,USUDESCRI,ltr_qrecibe,
                      (RTRIM(enfer.usu_nombres) + ' ' + RTRIM(enfer.usu_apellidos))as enfer,antes_trans.at_ta,antes_trans.at_t,antes_trans.at_fc,antes_trans.at_fr,
                      qincemin.quin_ta,qincemin.quin_t,qincemin.quin_fc,qincemin.quin_fr,folio,
                      treintamin.trein_ta,treintamin.trein_t,treintamin.trein_fc,treintamin.trein_fr,
                      sesentamin.sesen_ta,sesentamin.sesen_t,sesentamin.sesen_fc,sesentamin.sesen_fr,
                      mas1h.mas1h_ta,mas1h.mas1h_t,mas1h.mas1h_fc,mas1h.mas1h_fr,treintamin.trein_reac,treintamin.trein_obs,sesentamin.sesen_reac,sesentamin.sesen_obs,mas1h.mas1h_reac,mas1h.mas1h_obs,
                      ltr_estadoU,con_cante,antes_trans.at_obs,qincemin.quin_reac,qincemin.quin_obs
               from lTransfunc  inner join DGempres10..GENPACIEN on lTransfunc.genPacien = DGempres10..GENPACIEN.OID
                                inner join serviciosL on lTransfunc.servicio = serviciosL.ser_oid
                                inner join controlTrans on lTransfunc.ltr_oid = controlTrans.ltr_oid
                                inner join usuario med on lTransfunc.genMedico = med.usu_oid
                                inner join DGempres10..GENMEDICO on controlTrans.genMedicoc = DGempres10..GENMEDICO.OID
                                inner join DGempres10..GENESPMED on GENESPMED.MEDICOS = GENMEDICO.OID 
                                inner join DGempres10..GENESPECI on GENESPMED.ESPECIALIDADES = GENESPECI.OID
                                inner join DGempres10..GENUSUARIO on GENMEDICO.GENUSUARIO = GENUSUARIO.OID
                                inner join DGempres10..GENROL on GENROL.OID = GENUSUARIO.GENROL
                                inner join usuario as enfer on controlTrans.usu_oid = enfer.usu_oid
                                OUTER APPLY (select sig_ta as at_ta,sig_t as at_t,sig_fc as at_fc,sig_fr as at_fr,sig_obs as at_obs
												from signosV as a where controlTrans.con_oid=a.con_oid and sig_signo='at') as antes_trans
                                OUTER APPLY (select sig_ta as quin_ta,sig_t as quin_t,sig_fc as quin_fc,sig_fr  as quin_fr,sig_reac as quin_reac,sig_obs as quin_obs
												from signosV as a where controlTrans.con_oid=a.con_oid and sig_signo='15') as qincemin
								OUTER APPLY (select sig_ta as trein_ta,sig_t as trein_t,sig_fc as trein_fc,sig_fr  as trein_fr,sig_reac as trein_reac,sig_obs as trein_obs
												from signosV as a where controlTrans.con_oid=a.con_oid and sig_signo='30') as treintamin
								OUTER APPLY (select sig_ta as sesen_ta,sig_t as sesen_t,sig_fc as sesen_fc,sig_fr  as sesen_fr,sig_reac as sesen_reac,sig_obs as sesen_obs
												from signosV as a where controlTrans.con_oid=a.con_oid and sig_signo='60') as sesentamin
								OUTER APPLY (select sig_ta as mas1h_ta,sig_t as mas1h_t,sig_fc as mas1h_fc,sig_fr  as mas1h_fr,sig_reac as mas1h_reac,sig_obs as mas1h_obs
												from signosV as a where controlTrans.con_oid=a.con_oid and sig_signo='1h') as mas1h
			   where adnIngreso = ".$ingreso."
                           order by folio asc";
    
    $res = $con->query($unidad);
    
    $temp = 0;
    $temp2 = 0;
    echo "
        <style>
            #tabla{
                width:90%;
            }
            #folio{
                width:80%;
            }
            #obs{
                width:50%;
            }
        </style>
        <div id='contenedor'>
         <table id='enca' align=center style='font-size:65%'>
                <tr>
                    <td>
                        <strong>CONTROL DE TRANSFUSION SANGUINEA</strong>
                    </td>
                </tr>
                <tr>
                    <td align=center>
                        <strong>F1-PRGC-09</strong>
                    </td>
                </tr>
          </table>";
    while ($respu = mssql_fetch_array($res)){
        //$docpa = $respu['ltr_fecha'];
        $oidlt = $respu['ltr_oid'];
        $foli = $respu['folio'];
        
        $folio = "SELECT AINCONSEC, PACNUMDOC, HCNUMFOL, HCMTRANSF.HCCM05N01 AS Fecha_Solicitud,convert(nvarchar(100),HCMTRANSF.HCCM02N15) AS Sangre_Total,
                  convert(nvarchar(100),HCMTRANSF.HCCM02N16) AS Concentrado_Globular, convert(nvarchar(100),HCMTRANSF.HCCM02N17) AS Plasma_Fresco_Congelado,
                  convert(nvarchar(100),HCMTRANSF.HCCM02N18) AS Plaquetas_Manuales, convert(nvarchar(100),HCMTRANSF.HCCM02N19) AS Plaquetas_Por_Aferesis, convert(nvarchar(100),HCMTRANSF.HCCM02N20) As Crioprecitiado
                  FROM 
                  DGempres10..HCNFOLIO
                  INNER JOIN DGempres10..HCMTRANSF ON HCMTRANSF.HCNFOLIO = HCNFOLIO.OID
                  INNER JOIN DGempres10..GENPACIEN ON HCNFOLIO.GENPACIEN = GENPACIEN.OID 
                  INNER JOIN DGempres10..ADNINGRESO ON HCNFOLIO.ADNINGRESO = ADNINGRESO.OID AND ADNINGRESO.GENPACIEN = GENPACIEN.OID
                  WHERE AINCONSEC= $ingreso and HCNUMFOL = ".$foli."
                  ORDER BY HCNFOLIO.GENPACIEN";
        $fol = $con->query($folio);
        while($f = mssql_fetch_array($fol)){
            $fu = $f['Fecha_Solicitud'];
            $nf = $f['HCNUMFOL'];
        }

        if($temp !== $fu){
            
            echo "</br><table id='folio' align=center style='font-size:53%;'>
                        <tr>
                            <td>
                                FECHA
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                <font color=#585858>".$fu."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                NOMBRE DEL PACIENTE
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                <font color=#585858>".$respu['nombres']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                IDENTIFICACION
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                <font color=#585858>".$respu['PACNUMDOC']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                SERVICIO
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                <font color=#585858>".$respu['ser_descripcion']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                FOLIO
                            </td>
                            <td>
                                <font color=#585858>".$nf."</font>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                GRUPO SANGUINEO DEL PACIENTE
                            </td>
                            <td style='width:2%'></td>
                            <td align=center>
                                <font color=#585858>".$respu['ltr_grupoS']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                HEMOCOMPONENTE SOLICITADO
                            </td>
                            <td style='width:2%'></td>
                            <td align=center>
                                <font color=#585858>".$respu['ltr_componente']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                RASTREO DE ANTICUERPOS
                            </td>
                            <td style='width:2%'></td>
                            <td align=center>
                                <font color=#585858>".$respu['ltr_rai1']."</font>
                            </td>
                            <td style='width:2%'></td>
                            <td>
                                AUTOCONTROL
                            </td>
                            <td style='width:2%'></td>
                            <td align=center>
                                <font color=#585858>".$respu['ltr_autoC']."</font>
                            </td>
                        </tr>
                  </table>";
                  $temp = $fu;
            
        }
        if($temp2 !== $oidlt){
        
                  echo"<table id='tabla'  border='' style='font-size:53%;' align=center>
                        <tr>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>SELLO DE</br>
                                CALIDAD</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>HEMODERIVADO</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>GRUPO</br>
                                <strong>SANGUINEO</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>RESULTADO DE </br>
                                LAS PRUEBAS</br>
                                CRUZADAS</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>TEMPERATURA</br>
                                DE SALIDA</br>
                                DE LA UNIDAD</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>ESTADO</br>
                                DEL</br>
                                HEMOCOMPONENTE</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>CANTIDAD</br>
                                SOLICITADA</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>CANTIDAD</br>
                                ENTREGADA</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>TEMPERATURA</br>
                                DE LLEGADA</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>HORA INICIO</br>
                                DE LA </br>
                                TRANSFUSION</strong>
                            </td>
                            <td align=center>
                                <table style='font-size:100%'>
                                    <tr>
                                        <td colspan=4 style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                            <strong>SIGNOS VITALES AL INICIO DE LA </br>
                                            TRANSFUSION</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                            TA
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                            T
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                            FC
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                            FR
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>HORA FIN</br>
                                DE LA </br>
                                TRANSFUSION</strong>
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                <strong>OBSERVACIONES</strong>
                            </td>
                        </tr>
                        <tr>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_numSe']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_componente']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_grupoS']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_pruebC']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_tempS']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['ltr_estadoU']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['con_cants']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['con_cante']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['con_teml']."
                            </td>
                            <td align=center style='border-style:solid;border-width: 1px;'>
                                ".$respu['tiempoi']."
                            </td>
                            <td align='center' style='border-style:solid;border-width: 1px;'>
                                <table style='font-size:100%'>
                                    <tr>
                                        <td align=center style='border-style:solid;border-width: 1px;width: 35px'> 
                                            ".$respu['at_ta']."
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;width: 19px'>
                                            ".$respu['at_t']."
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;width: 30px'>
                                            ".$respu['at_fc']."
                                        </td>
                                        <td align=center style='border-style:solid;border-width: 1px;width: 30px'>
                                            ".$respu['at_fr']."
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td align='center' style='border-style:solid;border-width: 1px;'>
                                ".$respu['tiempof']."
                            </td>
                            <td id='obs' style='border-style:solid;border-width: 1px;width:10%'>
                                ".$respu['at_obs']."
                            </td>
                        </tr>
                        <tr>
                            <td colspan='3' style='border-style:solid;border-width: 1px;' align=center>
                                <strong>BACT.RESPONSABLE</strong></br>
                                ".$respu['medicor']."
                            </td>
                            <td colspan='3' style='border-style:solid;border-width: 1px;' align=center>
                                <strong>MED.RESPONSABLE</strong></br>
                                ".$respu['USUDESCRI']."
                            </td>
                            <td colspan='4' style='border-style:solid;border-width: 1px;' align=center>
                                <strong>ORIENTADOR</strong></br>
                                ".$respu['ltr_qrecibe']."
                            </td>
                            <td colspan='3' style='border-style:solid;border-width: 1px;' align=center>
                                <strong>ENFERMERA</strong></br>
                                ".$respu['enfer']."
                            </td>
                        </tr>
                        <tr>
                            <td align='center' colspan='13' style='border-style:solid;border-width: 1px;'>
                                <table style='font-size:100%'>
                                    <tr>
                                        <td>
                                            <table style='font-size:100%'>
                                                <tr>
                                                    <td align='center' colspan=5 style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        <strong>SIGNOS VITALES A LOS 15 MINUTOS</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        TA
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        T
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FC
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FR
                                                    </td>
                                                    <td align='center' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        Reaccion
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['quin_ta']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['quin_t']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['quin_fc']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['quin_fr']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['quin_reac']."
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align='center' colspan='5' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                         <strong>OBSERVACIONES</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan='5'>
                                                        ".$respu['quin_obs']."
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td>
                                             <table style='font-size:100%'>
                                                <tr>
                                                    <td align='center' colspan=5 style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        <strong>SIGNOS VITALES A LOS 30 MINUTOS</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        TA
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        T
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FC
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FR
                                                    </td>
                                                    <td align='center' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        Reaccion
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                         ".$respu['trein_ta']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['trein_t']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['trein_fc']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['trein_fr']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['trein_reac']."
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align='center' colspan='5' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                         <strong>OBSERVACIONES</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan='5'>
                                                        ".$respu['trein_obs']."
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td>
                                            <table style='font-size:100%'>
                                                <tr>
                                                    <td align='center' colspan=5 style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        <strong>SIGNOS VITALES A LOS 60 MINUTOS</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        TA
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        T
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FC
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FR
                                                    </td>
                                                    <td align='center' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        Reaccion
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['sesen_ta']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['sesen_t']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['sesen_fc']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['sesen_fr']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['sesen_reac']."
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align='center' colspan='5' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                         <strong>OBSERVACIONES</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan='5'>
                                                        ".$respu['sesen_obs']."
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td>
                                             <table style='font-size:100%'>
                                                <tr>
                                                    <td align='center' colspan=5 style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        <strong>SIGNOS VITALES 1 HORA DESPUES</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        TA
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        T
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FC
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        FR
                                                    </td>
                                                    <td align='center' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                        Reaccion
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['mas1h_ta']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['mas1h_t']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['mas1h_fc']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['mas1h_fr']."
                                                    </td>
                                                    <td align=center style='border-style:solid;border-width: 1px;'>
                                                        ".$respu['mas1h_reac']."
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align='center' colspan='5' style='border-style:solid;border-width: 1px;background-color: #F2F2F2;'>
                                                         <strong>OBSERVACIONES</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan='5'>
                                                        ".$respu['mas1h_obs']."
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                  </table>";
                  $temp2 = $oidlt;
        }
    }
    
    echo "</div>";
    echo '<table align="center">
            <tr>
                <td>
                    <a href="javascript:imprSelec()">
                        <img title="imprimir" border="0" src="../imagen/imprimir.png" width="30" height="30">
                    </a>
                </td>
                <td>
                    <a href="pisosLabo2.php?ingreso='.$ingreso.'"><img title="Exportar a PDF" src="../imagen/pdf.png" width="30" height="30" alt="pdf"/></a>
                </td>
            </tr>
          </table>
          <script>
                function printDiv()
                {
                    var divToPrint=document.getElementById("contenedor");
                    newWin= window.open("");
                    newWin.document.write(divToPrint.outerHTML);
                    newWin.print();
                    newWin.close();
                }
          </script>
          <script type="text/javascript">
            function imprSelec()
            {
                var ficha=document.getElementById("contenedor");var ventimp=window.open(" ","popimpr");ventimp.document.write(ficha.innerHTML);ventimp.document.close();ventimp.print();ventimp.close();
            }
          </script>';
    
    $con->cerrarConexion();
?>

        </form>
    </body>
</html>
